<extend name="Base:base" />
<block name="title"><title>订单管理</title></block>
<block name="content">
<script type="text/javascript" src="__PUBLIC__/Js/account_manage.js"></script>
<link href = "__PUBLIC__/Css/index.css" type = "text/css" rel = "stylesheet"/>
	<div id="content" align="center">		
		<div id="user" >
			<p style="margin-left:-560px; font-size:20px; color:#1d353f; font-weight:bold;">订单列表</p>
			<div id='OrderBtn'>
					<input type="button" value="全部" class="tableBtn" onclick="javascript:window.location.href = '__CONTROLLER__/getByType';">
					<input type="button" value="未消费" class="tableBtn" onclick="javascript:window.location.href = '__CONTROLLER__/getByType?type=1';">
					<input type="button" value="已消费" class="tableBtn" onclick="javascript:window.location.href = '__CONTROLLER__/getByType?type=2';">
			</div>
			<hr width="700px"/>
			<table>
			<tr style="color:#1d353f;"><th>序号</th><th>门票</th><th>数量<th>用户手机</th><th>状态</th><th>操作</th><tr>
			<foreach name="list" item="order">
			<tr>
				<td><if condition="($_GET['p'] eq 0)">{++$i}<else />{++$i + ($_GET['p']-1) * 7}</if></td>
				<td>{$order['ticket_name']}</td>
				<td>{$order['num']}</td>
				<td>{$order['account_phone']}</td>
				<td><switch name="order.type">
						<case value="0">未付款</case>
					    <case value="1">未消费</case>
					    <case value="2">已消费</case>
					</switch>
				</td>
				<td>
				    <if condition="$order['type'] eq 1">
					<a href="javascript:orderCheck('__CONTROLLER__/check','{$order['id']}')">
					<img src="__PUBLIC__/Img/check.jpg" /></a>
					</if>
					<a href="javascript:userDelete('__CONTROLLER__/delete','{$order['id']}')">
					<img src="__PUBLIC__/Img/delete.png" /></a>
					</td>
			</tr>
			</foreach>	
			</table>
		</div>	
		<div id="count" align="center">共{$count}条</div>	
		<div id="page" align="center">{$page}</div>	
	</div>
</block>
